<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script src="https://cdn.bootcdn.net/ajax/libs/lodash.js/2.4.2/lodash.js"></script>
<script>
    /*var a = {
        name:"damu",
        age:18
    }
    var b = {
        wife:"zdy"
    }
    console.log({...a,...b})*/


    /*var a = {
        name:"damu",
        age:18
    }
    var b = {
        wife:"zdy"
    }
    console.log(_.assign(a,b));*/

    var a = {
        name:"damu",
        age:18
    }
    var b = {
        wife:"zdy"
    }
    console.log(Object.assign(a,b))
</script>
</html>